{
    title:  'Modules',
    crumbs: [
        { "User's Guide": 'index.html' },
    ],
}
            <h1>Using Loadable Modules</h1>
            <p>Embeddable web servers have several competing goals. They endeavor to:</p>
            <ul>
                <li>Minimize memory footprint</li>
                <li>Minimize CPU consumption</li>
                <li>Maximize security</li>
                <li>Provide a strong and standard feature set</li>
            </ul>
            <p>It is difficult to meet all these goals in one server. Appweb, however, uses loadable modules to 
            segment functionality and make it possible to meet these goals effectively. The loadable modules ensure that
            the core HTTP server is compact, secure, and fast, and still has the ability to grow functionality as
            required.</p>
            
            <a id="appwebModules"></a>
            <h2>Appweb Modules</h2>
            <p>Appweb delivers the following modules:</p>
            <table title="modules" class="ui table segment">
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Purpose</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>mod_cgi</td>
                        <td>Common Gateway Interface (CGI) handler</td>
                    </tr>
                    <tr>
                        <td>mod_esp</td>
                        <td>Embedded Server Pages (ESP) handler</td>
                    </tr>
                    <tr>
                        <td>mod_ejs</td>
                        <td>Ejscript Server-Side JavaScript) module</td>
                    </tr>
                    <tr>
                        <td>mod_ssl</td>
                        <td>Secure Sockets Layer (SSL) module</td>
                    </tr>
                </tbody>
            </table>

            <a id="dynamicAndStaticLoading"></a>
            <h2>Dynamic Loading</h2>
            <p>An Appweb loadable module is a discrete unit of functionality that may be linked into Appweb to enhance
            the core HTTP server. Loadable Modules may be dynamically loaded via shared libraries or DLLs</p>
            <p>If building Appweb from source, modules can also be statically linked when the library initialization
                entry point is explicitly invoked from the web server main program.</p>
            
            <a id="loadModuleDirective"></a>
            <h2>LoadModule Directive</h2>
            <p>The Appweb configuration file specifies which modules to load and in what order. As some modules may
            depend on the functionality provided by other modules -- order does matter.</p>
            <p>The <a href="dir/module.html#loadModule">LoadModule</a> directive will load a module and activate it for
            processing. If the module is already loaded (either statically or dynamically), the load directive will
            have no effect.</p>
            <pre class="ui code segment">
LoadModule myModule lib/libmyModule
</pre>
            <p>On Windows, this directive will load libmyModule.dll. On Linux, it will load libmyModule.so. If the
            module is statically linked into Appweb, the Load Module directive will not need to load it.</p>
            <p>Appweb will look for the module in the directory specified relative to the directory defined by the
            Home directive. Appweb will search other directories if a <a href=
            "dir/module.html#loadModulePath">LoadModulePath</a> directive is specified. This will nominate a set of
            directories to search in order when attempting to locate the module.</p>
            <pre class="ui code segment">
LoadModulePath "../macosx-x64-debug/bin"
</pre>
            <p>For information about how to create a loadable module, see <a href=
            "../developers/modules.html">Creating Appweb Modules</a>.</p>
